def log(text):
    def decorator(func):
        def wrapper(*args, **kw):
            print(args)
            print('%s %s():' % (text, func.__name__))
            return func(*args, **kw)

        return wrapper

    return decorator


# now = log('execute')(now)
@log('execute')
def now(arr):
    print('2015-3-25', arr)


now([1, 2, 3])

print(now.__name__)

# @fn   fn 值必须是一个decorator: function, 也就是说fun(fn):
# @fn(xxx)  fn(xxx) 执行返回值必须是一个decorator: function, 也就是说fun(fn):

# @fn @fn(xxx) 最终的结果是一个wrapper(*args, *k*w)
